import { Injectable } from '@angular/core';
import { HttpClient } from '../../../../providers/httpClient';
import { Config } from '../../../../providers/config';

@Injectable()
export class MarketingCreditListService {
	constructor(
		public httpClient: HttpClient,
		public config: Config
		) { }
	getListData(managername,level) {
		let postBody = {
			"module": "KSB",
			"method": "USP_A02_0240",
			"type":"USP",
			"params": {
				'c_managername_i':managername,
        'c_level_i':level
			}
		};
		console.log("#####诚信管理列表查询条件######");
		console.log(postBody);
		return this.httpClient.post(postBody, {
			isShowLoading: true
		});
	}
	// 获取邮件详情
	getDetailData(id) {
		let postBody;
		postBody = {
			"module": "Email",
			"method": "getMailInfoByBosid",
			"params": {
				"mailbosid": id,
				"logid": "fengjk"
			}
		};
		return this.httpClient.post(postBody);
	}

  getAllAuthority() {
    let postBody = {
      "module": "KSB",
      "method": "USP_A02_0100",
      "type": "USP",
      "format": "json",
      "params": {
        "login_nm": ""
      }
    };

    return this.httpClient.post(postBody, {
      isShowLoading: true
    });
  }
}
